package o;

import android.util.Log;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.huawei.hms.aaid.constant.AaidIdConstant;
import java.nio.charset.Charset;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;

public abstract class bkn {
    public static byte[] ˏ(byte[] bArr) {
        if (bArr == null) {
            return new byte[0];
        }
        try {
            byte[] digest = MessageDigest.getInstance(AaidIdConstant.SIGNATURE_SHA256).digest(bArr);
            if (digest != null) {
                return digest;
            }
        } catch (NoSuchAlgorithmException e) {
            Log.e("SHA256", "NoSuchAlgorithmException: 'SHA-256'");
        }
        return new byte[0];
    }

    @NonNull
    public static byte[] ॱ(@Nullable String str) {
        if (str == null) {
            return new byte[0];
        }
        return ˏ(str.getBytes(Charset.defaultCharset()));
    }
}
